<#if imPackage??>
package ${imPackage};
</#if>

<#list imports as imp>
import  ${imp};
</#list>
import java.util.List;
import org.apache.ibatis.annotations.Param;

public interface  ${javaname}Mapper {
    int countByExample( ${javaname}Example example);

    int deleteByExample( ${javaname}Example example);

<#assign i = "0">
<#list tableEntity.columnEntitys as iskey>
    <#if iskey.COLUMN_KEY=true>
        <#list tabname_javaname_map?keys as key>
        <#list columnnameandtypemap[tabname_javaname_map[iskey.COLUMN_NAME]]?keys as iname>
        <#if i="0">
     int deleteByPrimaryKey(${iname} ${tabname_javaname_map[iskey.COLUMN_NAME]});
        </#if>
            <#assign i = "2">
        </#list>
    </#list>
    </#if>
</#list>


    int insert(${javaname} record);

    int insertSelective(${javaname} record);

    List<${javaname}> selectByExample(${javaname}Example example);

    int updateByExampleSelective(@Param("record") ${javaname} record, @Param("example") ${javaname}Example example);

    int updateByExample(@Param("record") ${javaname} record, @Param("example") ${javaname}Example example);

    int updateByPrimaryKeySelective(${javaname} record);

    int updateByPrimaryKey(${javaname} record);
      /**
      *根据主键批量删除
      *@param keys
      */
<#assign i = "0">
<#list tableEntity.columnEntitys as iskey>
    <#if iskey.COLUMN_KEY=true>
        <#list tabname_javaname_map?keys as key>
            <#list columnnameandtypemap[tabname_javaname_map[iskey.COLUMN_NAME]]?keys as iname>
                <#list columnnameandtypemap[tabname_javaname_map[iskey.COLUMN_NAME]]?keys as pt>
                    <#if i="0">
        int deleteByPrimaryKeys(List<${columnnameandtypemap[tabname_javaname_map[iskey.COLUMN_NAME]][pt]}> keys);
                    </#if>
                    <#assign i = "2">
                </#list>
            </#list>
        </#list>
    </#if>
</#list>
/**
* 根据对象中的参数删除
*/
<#--详细增删改方法-->
<#if isdetailed=true>
    <#list tableEntity.columnEntitys as iskey>
        <#if iskey.COLUMN_KEY=false>
        /**
        *根据对象中${tabname_javaname_map[iskey.COLUMN_NAME]}删除
        *@param entitys 需要删除的对象
        */
          int deleteBy${tabname_javaname_map[iskey.COLUMN_NAME]}(List<${javaname}> entitys);

        </#if>
    </#list>
<#--修改方法-->
    <#list tableEntity.columnEntitys as iskey>
        /**
        *根据对象中${tabname_javaname_map[iskey.COLUMN_NAME]}修改
        *@param entitys 需要修改的对象
        */
        void updateBy${tabname_javaname_map[iskey.COLUMN_NAME]}(List<${javaname}> entitys);
    </#list>
<#--批量增加方法-->
        /**
        *批量增加方法
        *@param entitys 增加的对象
        */
        void inserts(List<${javaname}> entitys);
</#if>
    }